<?php
include ("head.php");
$url="car_list.php?menuname=1_2";
?>
<div class="Main_body" id="Main_body">
    <div class="Main_locationBar">
      <div class="Main_locationBar_head"></div>
      <div class="Main_locationBar_body"><span id="CurrentPosition">当前位置：管理员 &gt; 车辆管理</span> </div>
      <div class="Main_locationBar_foot"></div>
    </div>
     <form name="form1" action="<?echo $url?>" method="post">
     <div id="shortcut_search">
        <div class="Main_bodySimpleSearchBar">
            <div class="Main_bodySimpleSearchBar_head"></div>
            <div class="Main_bodySimpleSearchBar_body">
                    <ww:hidden name="curPage" id="curPage"/>
                    <table width="100%" border="0" cellpadding="0" cellspacing="1" class="simpleSearchTable"
                           style="margin-top:5px">
                        <tbody>
                        <tr>
                            <td class="title">车辆号码：</td>
                            <td class="content">
                                <input name="cphm" id="componentSearchName"
                                              class="input_short" value="<?=$_POST["cphm"]?>"/>
                            </td>
                            <td> &nbsp;</td>
                            <td class="content">
                              &nbsp;
                            </td>
                        </tr>
                    </table>
                    </td>
                    </tr>
                    </tbody>
                    </table>
            </div>
            <div class="Main_bodySimpleSearchBar_foot"></div>
        </div>
        <div class="Main_buttonGroupBar">
            <div class="Main_buttonGroupBar_head"></div>
            <div class="Main_buttonGroupBar_body">
                <input type="submit" class="button" value="查询"/>
            </div>
            <div class="Main_buttonGroupBar_right"></div>
            <div class="Main_buttonGroupBar_foot"></div>
        </div>
    </div>
    </form>       
    
    <div class="Main_bodyListBar">
      <div class="Main_bodyListBar_head"><span>车辆管理</span> </div>
      <div class="Main_handleBar check_pass" id="Main_handleBar" <?if($msg==""){?>style="display:none"<?}?>>
        <div class="Main_handleBar_head"></div>
        <div class="Main_handleBar_body">
          <p ><?echo $msg;?></p>
        </div>
        <div class="Main_handleBar_foot"><a href="javascript:void(0)" class="close" onclick="closeHandleBar()"></a></div>
      </div>
      <div class="Main_bodyListBar_body">
        <table border="0" cellpadding="0" cellspacing="0" class="listTable">

          <tr>
			<th>序号</th>
			<th>车辆号码</th>
            <th>厂牌型号</th>
            <th>车辆类型</th>
            <th>使用单位或个人</th>
            <th>门禁卡号</th>
            <th>存包柜号</th>
            <th>待命状态</th>
            <th>操作</th>
          </tr>
			<?
			$tab="car";
			$and="";
			if($_POST["cphm"]!=""){
				$and=" and cphm like'%".$_POST["cphm"]."%'";
			}
			include ("pagination.php");
			$i=1;
			while ($rs=mysql_fetch_array($result)){
			?>
			 <tr onmouseover="listTable_trMouseOver(this)" onmouseout="listTable_trMouseOut(this)">
							<td>&nbsp;<?=$i?></td> 
							<td>&nbsp;<?=$rs["cphm"]?></td>
							<td>&nbsp;<?=$rs["cpxh"]?></td>
							<td>&nbsp;<?=$rs["cplx"]?></td>
							<td>&nbsp;<?=$rs["sydw"]?></td>
							<td>&nbsp;<?=$rs["mjkh"]?></td>
							<td>&nbsp;<?=$rs["cbgh"]?></td>
							<td>&nbsp;<?=$rs["dmzt"]?></td>
							<td>&nbsp;
							<a href="car_add.php?id=<?=$rs["id"]?>&menuname=1_2">编辑</a>&nbsp;&nbsp;
							<a href="#" onclick="toDelete('<?=$rs["id"]?>','<?=$rs["cphm"]?>')">删除</a>
							</td>
						  </tr>
			<?
			$i=$i+1;
			}
			include ("page.php");
			?>
        </table>
      </div>
      <div class="Main_bodyListBar_foot"></div>
    </div>
  	<div class="Main_buttonGroupBar">
    	<div class="Main_buttonGroupBar_head"></div>
    	<div class="Main_buttonGroupBar_body">
      	<input name="button4" type="button" class="button" value="添加" onclick="window.location='car_add.php?menuname=1_2'"/>
    	</div>
    	<div class="Main_buttonGroupBar_foot"></div>
  	</div>
  </div>
  <input type="hidden" name="strDelete" value="">
 
	  <script>
		function toDelete(id,cphm){
			if(confirm("您确定要删除吗？")){
				location.href="car_manage.php?method=delete&id="+id+"&cphm="+cphm;
			}
		}
	  </script>
<?php
include ("end.php");
?>

